home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 3
/
Gold Medal Software - Volume 3 (Gold Medal) (1994).iso
/
os2
/
te2_130t.arj
/
TE2INST.003
/
OS2RT.scr
< prev
next >
Wrap
Text File
|
1994-03-28
|
3KB
|
121 lines
; ---------------------------------------------------------------------
;
; TE/2 Script Language
; Copyright 1990-94, Oberon Software, Mankato, MN
;
; Script for automated logon to
; GEnie (the General Electric Network for Information Exchange)
; with special handling for the OS/2 RT
;
; ---------------------------------------------------------------------
;
; Put your entire userid;password string into the TE/2 dialing directory
; for this script (I.e., XXX99999,password
;
; ---------------------------------------------------------------------
integer mnuSelect = 1
string mnuTitle = " Mail is waiting "
string mnuItems = "!Mail, Command Mode !Bulletin Board, OS/2 RT !Realtime Conf, OS/2 RT !Libraries, OS/2 RT !Goodbye !Exit Script !"
integer mnuTop = 10
integer mnuLeft = 20
integer mnuAttr = 0x1f
integer mnuHiAttr = 0x71
string login
integer mail = TRUE
integer wtch
integer GEaction
string NoMailStr = "No letters waiting."
string MailWaitStr = "Command?"
string BBWaitStr = "1 ?"
string RTCWaitStr1 = "What ROOM (1-3), or <Q>uit?"
string RTCWaitStr2 = "is here."
string RTCRoom = "2"
string RTCName = ""
string GotoMail = "m200;9"
string GotoBB = "m1400;1"
string GotoRTC = "m1400;2"
string GotoLIB = "m1400;3"
;; -----------------------------------------------------------------------
subroutine getGenieAction
if !mail
mnuTitle = " No mail waiting "
mnuSelect = 2
endif
GEAction = PopupMenu(mnuTitle, mnuItems, mnuTop, mnuLeft, mnuAttr, mnuHiAttr, mnuSelect)
endsub
;; -----------------------------------------------------------------------
subroutine GenieAction
if GEaction == 1
transmit("%s^M", GotoMail)
if mail
waitfor(MailWaitStr, 120)
endif
elseif GEaction == 2
transmit("%s^M", GotoBB)
waitfor(BBWaitStr, 120)
transmit("new all^M")
elseif GEaction == 3
transmit("%s^M", GotoRTC)
waitfor(RTCWaitStr1, 120)
transmit("%s^M", RTCRoom)
waitfor(RTCWaitStr2, 60)
if strlen(RTCName)
transmit("/nam %s^M", RTCName)
endif
chat()
elseif GEaction == 4
transmit("%s^M", GotoLIB)
elseif GEaction == 5
transmit("bye^M")
waitfor("OFF AT", 60)
hangup(FALSE)
endif
endsub
;; -----------------------------------------------------------------------
program
if !connected
dial("genie")
endif
login = password("genie")
if !strlen(login)
message("^GNo password in directory, you're on your own^M^J")
endif
if connected
transmit("HHH")
if muxwait("/U#=/Uú╜/", 60)
if strlen(login)
transmit("%s^M", login)
wtch = watchfor(NoMailStr, "mail = FALSE")
waitfor("Enter #, <H>elp, or <CR> to continue?", 60)
cancelwatch(wtch)
gosub getGEnieAction
if GEaction
gosub GEnieAction
endif
endif
else
hangup(IFCARRIER)
endif
endif
end